<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>lwIP: src/include/lwip/dhcp.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">lwIP
   &#160;<span id="projectnumber">2.1.2</span>
   </div>
   <div id="projectbrief">Lightweight IP stack</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('dhcp_8h.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">dhcp.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &quot;<a class="el" href="opt_8h.html">lwip/opt.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="netif_8h.html">lwip/netif.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="udp_8h.html">lwip/udp.h</a>&quot;</code><br />
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a3751cc5daa0875d415ebacd8ad675f1e"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dhcp_8h.html#a3751cc5daa0875d415ebacd8ad675f1e">DHCP_COARSE_TIMER_SECS</a>&#160;&#160;&#160;60</td></tr>
<tr class="separator:a3751cc5daa0875d415ebacd8ad675f1e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad84b8f4deec421bbf6fd85e8fae047d6"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dhcp_8h.html#ad84b8f4deec421bbf6fd85e8fae047d6">DHCP_COARSE_TIMER_MSECS</a>&#160;&#160;&#160;(<a class="el" href="dhcp_8h.html#a3751cc5daa0875d415ebacd8ad675f1e">DHCP_COARSE_TIMER_SECS</a> * 1000UL)</td></tr>
<tr class="separator:ad84b8f4deec421bbf6fd85e8fae047d6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7a26209f52eebe8ded457ae141df403f"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dhcp_8h.html#a7a26209f52eebe8ded457ae141df403f">DHCP_FINE_TIMER_MSECS</a>&#160;&#160;&#160;500</td></tr>
<tr class="separator:a7a26209f52eebe8ded457ae141df403f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa92284faa099dac4331c1fc0b997dabc"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dhcp_8h.html#aa92284faa099dac4331c1fc0b997dabc">dhcp_remove_struct</a>(<a class="el" href="structnetif.html">netif</a>)&#160;&#160;&#160;<a class="el" href="group__netif__cd.html#ga5ce61a277e1951183f7b7d03742c231f">netif_set_client_data</a>(<a class="el" href="structnetif.html">netif</a>, LWIP_NETIF_CLIENT_DATA_INDEX_DHCP, NULL)</td></tr>
<tr class="separator:aa92284faa099dac4331c1fc0b997dabc"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga43812097832716a462c660eb59cc1bf8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dhcp4.html#ga43812097832716a462c660eb59cc1bf8">dhcp_set_struct</a> (struct <a class="el" href="structnetif.html">netif</a> *<a class="el" href="structnetif.html">netif</a>, struct dhcp *dhcp)</td></tr>
<tr class="separator:ga43812097832716a462c660eb59cc1bf8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga292a1b0c0c288ec508108a3fba473e64"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dhcp4.html#ga292a1b0c0c288ec508108a3fba473e64">dhcp_cleanup</a> (struct <a class="el" href="structnetif.html">netif</a> *<a class="el" href="structnetif.html">netif</a>)</td></tr>
<tr class="separator:ga292a1b0c0c288ec508108a3fba473e64"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0c50968d9811aa2aa67fadc0885d744f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dhcp4.html#ga0c50968d9811aa2aa67fadc0885d744f">dhcp_start</a> (struct <a class="el" href="structnetif.html">netif</a> *<a class="el" href="structnetif.html">netif</a>)</td></tr>
<tr class="separator:ga0c50968d9811aa2aa67fadc0885d744f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga583eb8d58f5e96b7dea717948578a947"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dhcp4.html#ga583eb8d58f5e96b7dea717948578a947">dhcp_renew</a> (struct <a class="el" href="structnetif.html">netif</a> *<a class="el" href="structnetif.html">netif</a>)</td></tr>
<tr class="separator:ga583eb8d58f5e96b7dea717948578a947"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf92f7afb58252f82a749064602974bd4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dhcp4.html#gaf92f7afb58252f82a749064602974bd4">dhcp_release</a> (struct <a class="el" href="structnetif.html">netif</a> *<a class="el" href="structnetif.html">netif</a>)</td></tr>
<tr class="separator:gaf92f7afb58252f82a749064602974bd4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga93f6bf21086dc9b10c0bec4676f97312"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dhcp4.html#ga93f6bf21086dc9b10c0bec4676f97312">dhcp_stop</a> (struct <a class="el" href="structnetif.html">netif</a> *<a class="el" href="structnetif.html">netif</a>)</td></tr>
<tr class="separator:ga93f6bf21086dc9b10c0bec4676f97312"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf7cd42b9f220446b6a597d3474da6ece"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dhcp4.html#gaf7cd42b9f220446b6a597d3474da6ece">dhcp_release_and_stop</a> (struct <a class="el" href="structnetif.html">netif</a> *<a class="el" href="structnetif.html">netif</a>)</td></tr>
<tr class="separator:gaf7cd42b9f220446b6a597d3474da6ece"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabd7fcc7e0799e313885fc7fd9d4992ad"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dhcp4.html#gabd7fcc7e0799e313885fc7fd9d4992ad">dhcp_inform</a> (struct <a class="el" href="structnetif.html">netif</a> *<a class="el" href="structnetif.html">netif</a>)</td></tr>
<tr class="separator:gabd7fcc7e0799e313885fc7fd9d4992ad"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a04f3824720223c439165243527906002"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dhcp_8h.html#a04f3824720223c439165243527906002">dhcp_network_changed</a> (struct <a class="el" href="structnetif.html">netif</a> *<a class="el" href="structnetif.html">netif</a>)</td></tr>
<tr class="separator:a04f3824720223c439165243527906002"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1fc0a94e0b94f13c5d302018f7ecb535"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dhcp_8h.html#a1fc0a94e0b94f13c5d302018f7ecb535">dhcp_arp_reply</a> (struct <a class="el" href="structnetif.html">netif</a> *<a class="el" href="structnetif.html">netif</a>, const <a class="el" href="ip4__addr_8h.html#a3d3b45daffbc15d65da236e31e621b7e">ip4_addr_t</a> *addr)</td></tr>
<tr class="separator:a1fc0a94e0b94f13c5d302018f7ecb535"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae24a2529372218327ab9cb6592041c85"><td class="memItemLeft" align="right" valign="top">u8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dhcp_8h.html#ae24a2529372218327ab9cb6592041c85">dhcp_supplied_address</a> (const struct <a class="el" href="structnetif.html">netif</a> *<a class="el" href="structnetif.html">netif</a>)</td></tr>
<tr class="separator:ae24a2529372218327ab9cb6592041c85"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad7480883d64f3d6f083c8aa933b5e3cb"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dhcp_8h.html#ad7480883d64f3d6f083c8aa933b5e3cb">dhcp_coarse_tmr</a> (void)</td></tr>
<tr class="separator:ad7480883d64f3d6f083c8aa933b5e3cb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a601d97faa24fa7289244bb452f052045"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dhcp_8h.html#a601d97faa24fa7289244bb452f052045">dhcp_fine_tmr</a> (void)</td></tr>
<tr class="separator:a601d97faa24fa7289244bb452f052045"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>DHCP client API </p>
</div><h2 class="groupheader">Macro Definition Documentation</h2>
<a id="ad84b8f4deec421bbf6fd85e8fae047d6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad84b8f4deec421bbf6fd85e8fae047d6">&#9670;&nbsp;</a></span>DHCP_COARSE_TIMER_MSECS</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define DHCP_COARSE_TIMER_MSECS&#160;&#160;&#160;(<a class="el" href="dhcp_8h.html#a3751cc5daa0875d415ebacd8ad675f1e">DHCP_COARSE_TIMER_SECS</a> * 1000UL)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>period (in milliseconds) of the application calling <a class="el" href="dhcp_8h.html#ad7480883d64f3d6f083c8aa933b5e3cb">dhcp_coarse_tmr()</a> </p>

</div>
</div>
<a id="a3751cc5daa0875d415ebacd8ad675f1e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3751cc5daa0875d415ebacd8ad675f1e">&#9670;&nbsp;</a></span>DHCP_COARSE_TIMER_SECS</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define DHCP_COARSE_TIMER_SECS&#160;&#160;&#160;60</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>period (in seconds) of the application calling <a class="el" href="dhcp_8h.html#ad7480883d64f3d6f083c8aa933b5e3cb">dhcp_coarse_tmr()</a> </p>

</div>
</div>
<a id="a7a26209f52eebe8ded457ae141df403f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7a26209f52eebe8ded457ae141df403f">&#9670;&nbsp;</a></span>DHCP_FINE_TIMER_MSECS</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define DHCP_FINE_TIMER_MSECS&#160;&#160;&#160;500</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>period (in milliseconds) of the application calling <a class="el" href="dhcp_8h.html#a601d97faa24fa7289244bb452f052045">dhcp_fine_tmr()</a> </p>

</div>
</div>
<a id="aa92284faa099dac4331c1fc0b997dabc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa92284faa099dac4331c1fc0b997dabc">&#9670;&nbsp;</a></span>dhcp_remove_struct</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define dhcp_remove_struct</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><a class="el" href="structnetif.html">netif</a></td><td>)</td>
          <td>&#160;&#160;&#160;<a class="el" href="group__netif__cd.html#ga5ce61a277e1951183f7b7d03742c231f">netif_set_client_data</a>(<a class="el" href="structnetif.html">netif</a>, LWIP_NETIF_CLIENT_DATA_INDEX_DHCP, NULL)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Remove a struct dhcp previously set to the netif using <a class="el" href="group__dhcp4.html#ga43812097832716a462c660eb59cc1bf8">dhcp_set_struct()</a> </p>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="a1fc0a94e0b94f13c5d302018f7ecb535"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1fc0a94e0b94f13c5d302018f7ecb535">&#9670;&nbsp;</a></span>dhcp_arp_reply()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void dhcp_arp_reply </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structnetif.html">netif</a> *&#160;</td>
          <td class="paramname"><em>netif</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="ip4__addr_8h.html#a3d3b45daffbc15d65da236e31e621b7e">ip4_addr_t</a> *&#160;</td>
          <td class="paramname"><em>addr</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Match an ARP reply with the offered IP address: check whether the offered IP address is not in use using ARP</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">netif</td><td>the network interface on which the reply was received </td></tr>
    <tr><td class="paramname">addr</td><td>The IP address we received a reply from </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ad7480883d64f3d6f083c8aa933b5e3cb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad7480883d64f3d6f083c8aa933b5e3cb">&#9670;&nbsp;</a></span>dhcp_coarse_tmr()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void dhcp_coarse_tmr </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>The DHCP timer that checks for lease renewal/rebind timeouts. Must be called once a minute (see <a class="el" href="dhcp_8h.html#a3751cc5daa0875d415ebacd8ad675f1e">DHCP_COARSE_TIMER_SECS</a>). </p>

</div>
</div>
<a id="a601d97faa24fa7289244bb452f052045"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a601d97faa24fa7289244bb452f052045">&#9670;&nbsp;</a></span>dhcp_fine_tmr()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void dhcp_fine_tmr </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>DHCP transaction timeout handling (this function must be called every 500ms, see <a class="el" href="dhcp_8h.html#a7a26209f52eebe8ded457ae141df403f">DHCP_FINE_TIMER_MSECS</a>).</p>
<p>A DHCP server is expected to respond within a short period of time. This timer checks whether an outstanding DHCP request is timed out. </p>

</div>
</div>
<a id="a04f3824720223c439165243527906002"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a04f3824720223c439165243527906002">&#9670;&nbsp;</a></span>dhcp_network_changed()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void dhcp_network_changed </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structnetif.html">netif</a> *&#160;</td>
          <td class="paramname"><em>netif</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Handle a possible change in the network configuration.</p>
<p>This enters the REBOOTING state to verify that the currently bound address is still valid. </p>

</div>
</div>
<a id="ae24a2529372218327ab9cb6592041c85"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae24a2529372218327ab9cb6592041c85">&#9670;&nbsp;</a></span>dhcp_supplied_address()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">u8_t dhcp_supplied_address </td>
          <td>(</td>
          <td class="paramtype">const struct <a class="el" href="structnetif.html">netif</a> *&#160;</td>
          <td class="paramname"><em>netif</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>check if DHCP supplied netif-&gt;<a class="el" href="structip__addr.html">ip_addr</a></p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">netif</td><td>the netif to check </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>1 if DHCP supplied netif-&gt;<a class="el" href="structip__addr.html">ip_addr</a> (states BOUND or RENEWING), 0 otherwise </dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_b0856f6b0d80ccb263b2f415c91f9e17.html">include</a></li><li class="navelem"><a class="el" href="dir_4e6b3cf33a61b6caac9c8ac30c866f37.html">lwip</a></li><li class="navelem"><a class="el" href="dhcp_8h.html">dhcp.h</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
  </ul>
</div>
</body>
</html>
